package com.ruoyi.business.mapper;

import com.ruoyi.business.entity.HomestayInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Ao
 * @since 2024-01-08
 */
@Mapper
public interface FrontHomestayInfoMapper extends BaseMapper<HomestayInfo> {

    List<HomestayInfo> searchHomestayByConditions(@Param("score") Float score, @Param("minPrice") Float minPrice, @Param("maxPrice") Float maxPrice, @Param("name") String name, @Param("isFeature") Long isFeature);


    //查询某个中心点指定公里数范围内的民宿
    List<HomestayInfo> selectByDistance(@Param("longitude") Double longitude, @Param("latitude") Double latitude, @Param("distance") Double distance);


    @Select("select * from homestay_info")
    List<HomestayInfo> list2();
}
